{extend name='admin@public/content'}

{block name="button"}
<button data-open='{:url("$classuri/")}' data-title="返回列表" class='layui-btn layui-btn-sm layui-btn-primary'><i class='fa fa-arrow-left'></i> 返回列表</button>
{/block}

{block name='content'}

<!--右侧编辑区 开始-->
<div class="panel panel-default article-right" style="overflow:hidden;width: 96rem;">
    <div class="panel-body">
        <form class="form-horizontal" action="{:url()}" data-auto="true" method="post">
            <input type="hidden" name="id" value='{$vo.id|default=""}'>

            <div class="form-group">
                <div class="col-md-12">
                    <div class="input-group">
                        <span class="input-group-addon rw12">套餐名称</span>
                        <input class="layui-input rw60" maxlength="200" required="required"  name="name" value="{$vo.name|default=''}" title="套餐名称不能为空哦" placeholder="输入套餐名称">
                    </div>
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-12">
                    <div class="input-group">
                        <span class="input-group-addon rw12">体检中心</span>
                        <select name='mec_id' class='input-sm form-control' style="width:25rem;">
                            {foreach $mecs as $key=>$cate}
                            <option  value='{$key}'>{$cate}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-12">
                    <div class="input-group">
                        <span class="input-group-addon rw12">套餐价格</span>
                        <input class="layui-input rw25" name='price' title="套餐价格不能为空哦" placeholder="设置套餐价格" value="{$vo.price|default=''}">
                    </div>
                </div>
            </div>

            <div class="form-actions">
                <div class="row">
                    <div class="layui-form-item text-center">
                        <button class="layui-btn" type='submit'>保存数据</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<!--右侧编辑区 结束-->

{/block}


{block name='script'}
<script>
    $(function () {
        $('body').on('change', '.upload-image-box input', function () {
            alert(this.value);
            $('.news-item.active').css('background-image', 'url(' + this.value + ')');
            $(this).parent('.upload-image-box').css('background-image', 'url(' + this.value + ')');
        });
    });
</script>
{/block}

{block name="style"}
<style>
    .panel{border-radius:0}
    .article-right {position:absolute;left:20px;position:absolute;}
    .article-right .layui-input{border-radius:0;border:1px solid #e5e6e7;}
    .article-right .layui-input:hover, .news-right .layui-input:focus{border-color:#e5e6e7!important;}
    .article-right .input-group-addon{background:#fff;border-radius:0;border-color:#e5e6e7;text-align:right}
    .article-right .upload-image-box{width:150px;height:120px;background-size:cover;background-position:center center;}
</style>
{/block}